package com.common.sdk.net.connect.interfaces;

import com.common.sdk.net.connect.http.model.HttpError;
import com.common.sdk.net.connect.http.model.OkHttpSession;

/**
 * Created by chengjiangsang116630 on 2018/1/17.
 */

public interface IResponseListener {

    /**
     * 网络请求成功返回
     *  @param notNullData 解析完成的数据
     * @param session 会话，里面保有request, response等
     */
    public void onSuccess(Object notNullData, OkHttpSession session);

    /**
     * 网络请求失败
     *  @param error
     * @param session 会话，里面保有request, response等
     */
    public void onFailure(HttpError error, OkHttpSession session);

    public void onCancelled(OkHttpSession session);

}
